package com.seeyoui.kensite.bussiness.exam.common;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.seeyoui.kensite.bussiness.exam.question.domain.QuestionVO;

/**
 * 文件名：Method<br>
 * 
 * 说明：考试模块公用方法类 <br>
 * 
 */
public final class Method {

	private Method() {
	}

	/**
	 * 将List对象转换为Map对象
	 * 
	 * @param lsQuestions
	 * @return Map<String, QuestionVO>
	 */
	public static Map<String, QuestionVO> convertListToMap(List<QuestionVO> lsQuestions) {
		return lsQuestions.stream().collect(Collectors.toMap(QuestionVO::getId, question -> question));
	}
}